import service from "@/ultis/request"

class Product {
    abc() {
        return service({
            method: 'get',
            url: '/abc',
        })
    }
    getAllGoods(params: any) {
        return service({
            method: 'get',
            url: '/getAllGoods',
            params
        })
    }
    // 注册
    getPhoneCode(params: any) {
        return service({
            method: 'post',
            url: '/getPhoneCode',
            data: params
        })
    }
    addCart(params: any) {
        return service({
            method: 'post',
            url: '/addCart',
            data: params
        })
    }

    getCart() {
        return service({
            method: 'get',
            url: '/getCart'
        })
    }

    updateCart(params: any) {
        return service({
            method: 'post',
            url: '/updateCart',
            data: params
        })
    }

    getAddress() {
        return service({
            method: 'get',
            url: '/getAddress'
        })
    }

    updateAddress(params: any) {
        return service({
            method: 'post',
            url: '/updateAddress',
            data: params
        })
    }
    deleteAddress(params: any) {
        return service({
            method: 'post',
            url: '/deleteAddress',
            data: params
        })
    }
    addAddress(params: any) {
        return service({
            method: 'post',
            url: '/addAddress',
            data: params
        })
    }
    getDefaultAddress() {
        return service({
            method: 'get',
            url: '/getDefaultAddress',
        })
    }
    getAddressById(params: any) {
        return service({
            method: 'get',
            url: '/getAddressById',
            params
        })
    }

    updateAddressStatus(params: any) {
        return service({
            method: 'post',
            url: '/updateAddressStatus',
            data: params
        })
    }
    publishtuwen(params: any) {
        return service({
            method: 'post',
            url: '/publishtuwen',
            data: params
        })
    }

}

export default Product